Honor workflow-level Codex tuning in workflows#1215
Honor workflow-level Codex tuning in workflows#1215matzls wants to merge 23 commits intocoleam00:devfrom
Conversation
Chat platform adapters (Telegram, Slack, Discord) in @archon/adapters are
pure transport and cannot call messageDb directly. Until now, only the Web
adapter's PersistenceBuffer and the HTTP routes persisted messages, leaving
telegram conversations with rows in remote_agent_conversations but zero rows
in remote_agent_messages. The Web UI then rendered these conversations as
empty.
Add four persistence hooks inside handleMessage, gated strictly on
platform.getPlatformType() === 'telegram' so the web path is completely
untouched:
1. User message persistence after conversation creation + title generation
but BEFORE the natural-language approval gate, so approval responses are
captured. !message.startsWith('/') excludes deterministic slash commands.
2. Stream-mode assistant persistence after parseOrchestratorCommands, inside
the "no retract" branch, so retracted /invoke-workflow text is never saved
(matches Web's MessagePersistence.retractLastSegment semantics).
3. Batch-mode assistant persistence after platform.sendMessage succeeds, with
the same retract guard.
4. Top-level catch persistence for error responses, so orphan user rows
without assistant counterparts can't appear in the Web UI view.
The conversation variable is hoisted out of the inner try block so the
catch handler can reference it. All persistence errors are logged and
swallowed — a DB hiccup must not break the user-facing Telegram reply.
Gate is strict 'telegram' for MVP. Broadening to Slack/Discord/GitHub will
require auditing those adapters' webhook replay behavior first.
Known MVP limitations (will file as follow-ups):
- Tool-call metadata not captured for telegram (web buffer still owns that)
- Workflow dispatch progress messages from dag-executor not captured
- Non-deterministic slash commands also excluded by the coarse startsWith('/')
gate (acceptable — chat clients don't send ad-hoc slash commands)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Web UI disables the message input for any conversation whose platform_type is not 'web' because Scope B (bidirectional bridging) isn't shipped yet. The old disabledReason string — "Continuing chats from other platforms in the Web UI is coming soon" — was both vague and increasingly misleading now that Telegram conversations render their full history in the Web UI. Replace the hardcoded string with a platform keyed lookup map so each platform gets a clear "reply from the originating app" hint. The disable condition itself is unchanged; this is pure copy + a small constant. Only telegram is functionally wired up (persistence hooks land in a sibling commit); slack/discord/github entries are forward-compatible and take effect as soon as persistence is broadened to those platforms. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a focused test suite for the telegram persistence gate added to
handleMessage. Covers the three load-bearing cases on the user-message
side of the gate:
1. Natural-language telegram messages persist exactly one row with role
'user', the DB conversation id, the raw message text, and metadata
{ platformType: 'telegram' }.
2. Deterministic slash commands (/help) skip persistence entirely —
neither user nor assistant rows are created.
3. Web-platform conversations do NOT trigger the centralized path, so
web's existing MessagePersistence buffer still owns that flow.
Assistant-message persistence hooks (inside handleStreamMode,
handleBatchMode, and the top-level catch) require mocking sendQuery to
yield actual content, which needs a more elaborate mock setup than the
existing test file provides. Tracking that as a follow-up rather than
blocking the MVP on it — the user-persistence path is the primary new
logic and is covered here.
A new mock.module('../db/messages', ...) is added near the existing DB
mocks so that orchestrator-agent.ts's new messageDb import does not try
to open a real DB connection. orchestrator-agent.test.ts runs in its
own bun test invocation per packages/core/package.json, so the new
mock does not pollute sibling orchestrator tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This repo is a clone of coleam00/Archon and will evolve upstream as the project moves through beta. To keep local customizations persistent across upstream releases without merge chaos, the working copy is set up fork-first: origin → matzls/Archon (push access), upstream → coleam00/Archon (read-only). Add a "Fork & Upstream Integration" section to CLAUDE.md next to the existing Git Workflow content so future sessions have a single grounded reference for: - Which remote is which and what dev tracks - Where different customization types belong (personal config vs. upstreamable code changes vs. personal code changes) - The exact commands to integrate upstream releases (fetch + ff merge + rebase feature branches) - The exact commands to contribute back via gh pr create Intentionally short — this is routing guidance, not a git tutorial. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9-node DAG PIV loop tuned for Codex behavioral tendencies: numbered SIGNAL EMISSION CONTRACTs, task-scoped implement loop (no repo-wide validators mid-task), pre-existing failure tolerance in code-review, per-file git staging, and tightened COMPLETE signal. Validated end-to-end on my-second-brain-build (Python/Obsidian vault) with 32 pre-existing ruff violations — workflow correctly scoped fixes to branch-introduced issues only. Also add root-level artifacts/ to .gitignore (workflow runtime output). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reuse the deterministic slash-command allowlist for Telegram user-message persistence so slash-prefixed AI prompts are stored while ephemeral commands still skip persistence. Add a regression test covering /etc/hosts and stabilize the command-parser mock in the Telegram persistence test block. Co-authored-by: Codex <noreply@openai.com>
Context: preserve and land the Codex-specific assist workflow onto current dev while keeping the newer telegram persistence behavior already present on dev. Change: - add the bundled archon-assist-codex command and workflow defaults plus the tracked Archon skill files they depend on - default continue and orchestrator assist routing to archon-assist-codex when the assistant type is codex - extend server, web, docs, and core test coverage for the new workflow and the assistant-aware prompt-builder signatures Validation: - bun test packages/cli/src/commands/continue.test.ts - bun test packages/core/src/orchestrator/prompt-builder.test.ts - bun test packages/core/src/orchestrator/orchestrator.test.ts - bun test packages/server/src/routes/api.health.test.ts - bun test packages/server/src/routes/api.workflows.test.ts - bun test packages/web/src/lib/workflow-metadata.test.ts - bun test packages/workflows/src/defaults/bundled-defaults.test.ts - bun --filter @archon/cli type-check - bun --filter @archon/core type-check - bun --filter @archon/server type-check - bun --filter @archon/workflows type-check - bun --filter @archon/web type-check - bun run validate Codex-Session: 019d80c8-3cb7-79b1-8443-d09a42cb5020 Codex-Rollout: sessions/2026/04/12/rollout-2026-04-12T10-21-39-019d80c8-3cb7-79b1-8443-d09a42cb5020.jsonl Co-authored-by: Codex <noreply@openai.com>
Extract the detect-project workflow node into a reusable Bun script while preserving its stdout contract. Also tighten the Codex loop prompts so feedback fixes use per-file staging, scoped validation stays tool-accurate, and iteration violations fail without rewriting history. Extend typed ESLint coverage to .archon/scripts so the new script participates in the existing pre-commit checks. Co-authored-by: Codex <noreply@openai.com>
Document how assistant selection works across host skills, conversations, workflows, and nodes. Capture fork-specific Codex additions, upstream differences, and the current Codex limitations for workflow nodes. Co-authored-by: Codex <noreply@openai.com>
Preview upstream sync onto custom dev; auto-merged cleanly and passed bun run validate. Co-authored-by: Codex <noreply@openai.com>
Document the phase-by-phase session model for archon-piv-loop-codex, including fresh-context boundaries, interactive loop resume behavior, and a flow diagram for future review. Co-authored-by: Codex <noreply@openai.com>
Promote archon-piv-loop-codex into the bundled default workflow set and update the overview docs to advertise it there. Also fix the execution-notes path references after the workflow moved under .archon/workflows/defaults. Co-authored-by: Codex <noreply@openai.com>
Exclude CLI-backed workflow runs from the server startup orphan-failure sweep and document the distinction in the workflow authoring guide. This keeps server restarts from marking active CLI executions failed while they continue in a separate process against the same database. Co-authored-by: Codex <noreply@openai.com>
Add a reusable reference for repeated Archon log-debugging sessions and surface it from the Codex assist lane and the top-level Archon skill routing table. The new guide explains the three log layers, run discovery, JSONL filtering, event interpretation, and when to use UI or raw logs. Co-authored-by: Codex <noreply@openai.com>
- bundle the detect-project helper as a default script and resolve Archon default scripts when repo-local scripts are absent - stop PIV loop nodes early when git HEAD and task-progress tracking stop advancing - fail workflow CLI commands early when ~/.archon is not writable and clarify the sandbox failure mode in docs - persist richer DAG failure metadata for partial-run diagnostics Co-authored-by: Codex <noreply@openai.com>
- add routing guidance for monitoring, interactive relays, and log debugging in the Archon skill - add focused references for workflow monitoring cadence, paused-run relay behavior, and JSONL-first debugging - keep Archon follow-up handling grounded in the run status and per-run logs Co-authored-by: Codex <noreply@openai.com>
Add the generated PRD for workflow node display names to the Archon repo under docs/prd. The document keeps one PRD with a small execution-graph-only phase 1 and defers builder, non-graph execution surfaces, inference, and historical-fidelity questions to phase 2. Co-authored-by: Codex <noreply@openai.com>
Add the fork-level design doc that defines the Codex-first workflow surface, decision rules, and follow-on implementation sequence. Co-authored-by: Codex <noreply@openai.com>
Refine the Archon Codex skill and assist command so substantial implementation work routes to the Codex PIV lane, and add explicit worktree-proof/readback guardrails for assist-mode edits. Co-authored-by: Codex <noreply@openai.com>
Add a full Codex-first operator and authoring surface for the Archon skill, including workflow monitoring, debugging, repo init, command authoring, DAG authoring, CLI references, configuration guidance, and a Codex capability crosswalk. Correct the documented Codex parity boundaries so loop model/provider overrides are described accurately and workflow-level Codex tuning fields are called out as parsed but not runtime-effective per workflow in the current executor. Validation: - git diff --check - archon workflow list --json Co-authored-by: Codex <noreply@openai.com>
Make modelReasoningEffort, webSearchMode, and additionalDirectories effective from workflow YAML for Codex execution, with config fallback for normal and loop nodes. Add regression coverage for override, fallback, and mixed-provider loop preservation. Update Codex Archon references to match the implemented precedence. Co-authored-by: Codex <noreply@openai.com>
Update the assistant architecture reference to reflect that workflow-level Codex tuning fields now override Archon config with config fallback, matching the shipped runtime behavior. Co-authored-by: Codex <noreply@openai.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request introduces a comprehensive Codex-first workflow infrastructure, including two new bundled Codex-tuned workflows ( Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for contributing, but this PR is way to large to review, please reopen smaller pieces of work |
Summary
Validation
Notes
Summary by CodeRabbit
New Features
archon-assist-codex) for general AI help and explorationDocumentation